const AppIndex = () => import('@/views/AppIndex.vue');
const AppWelcome = () => import('@/views/AppWelcome.vue');
const AppUserInfo = () => import('@/views/AppUserInfo.vue');
const AppUserList = () => import('@/views/AppUserList.vue');
const AppMatch = () => import('@/views/AppMatch.vue');
const AppRule = () => import('@/views/AppRule.vue');
const AppChess = () => import('@/views/AppChess.vue');

const dynamicRouter = [
    {
        path: '/index',
        name: 'AppIndex',
        component: AppIndex,
        meta: {
            requireAuth: true,
            power: [1, 2, 3]
        },
        children: [
            {
                path: '',
                name: 'AppWelcome',
                component: AppWelcome,
                meta: {
                    requireAuth: true,
                    power: [1, 2, 3]
                }
            },
            {
                path: 'userlist',
                name: 'AppUserList',
                component: AppUserList,
                meta: {
                    requireAuth: true,
                    power: [1, 2, 3]
                }
            },
            {
                path: 'userinfo',
                name: 'AppUserInfo',
                component: AppUserInfo,
                meta: {
                    requireAuth: true,
                    power: [1, 2, 3]
                }
            },
            {
                path: 'match',
                name: 'AppMatch',
                component: AppMatch,
                meta: {
                    requireAuth: true,
                    power: [1, 2, 3]
                }
            },
            {
                path: 'rule',
                name: 'AppRule',
                component: AppRule,
                meta: {
                    requireAuth: true,
                    power: [1, 2, 3]
                }
            },
            {
                path: 'chess',
                name: 'AppChess',
                component: AppChess,
                meta: {
                    requireAuth: true,
                    power: [1, 2, 3]
                }
            }
        ]
    }
];

export default dynamicRouter;